package com.kuzlak.cms.module.wms.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import lombok.Data;

/**
 * 入库记录表
 * @TableName wms_bound
 */
@TableName(value ="wms_bound")
@Data
public class WmsBound implements Serializable {
    /**
     * 入库记录唯一标识符
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 入库ID
     */
    private Long infoId;

    /**
     * 入库商品ID
     */
    private Long shopInfoId;

    /**
     * 入库数量
     */
    private Integer quantity;

    /**
     * 入库合格数量
     */
    private Integer qualifiedQuantity;

    /**
     * 入库不合格数量
     */
    private Integer unqualifiedQuantity;

    /**
     * 入库单价
     */
    private Long unitPrice;

    /**
     * 暂停:-1,正常:1,待审核:2,未审核:3
     */
    private Integer status;

    /**
     * 
     */
    private Long operatorId;

    /**
     * 删除状态
     */
    @TableLogic
    private Integer deleted;

    /**
     *
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createDate;

    /**
     *
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateDate;

    /**
     * 
     */
    private Long reviewDate;

    /**
     * 
     */
    private Long reviewManagerId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WmsBound other = (WmsBound) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getInfoId() == null ? other.getInfoId() == null : this.getInfoId().equals(other.getInfoId()))
            && (this.getShopInfoId() == null ? other.getShopInfoId() == null : this.getShopInfoId().equals(other.getShopInfoId()))
            && (this.getQuantity() == null ? other.getQuantity() == null : this.getQuantity().equals(other.getQuantity()))
            && (this.getQualifiedQuantity() == null ? other.getQualifiedQuantity() == null : this.getQualifiedQuantity().equals(other.getQualifiedQuantity()))
            && (this.getUnqualifiedQuantity() == null ? other.getUnqualifiedQuantity() == null : this.getUnqualifiedQuantity().equals(other.getUnqualifiedQuantity()))
            && (this.getUnitPrice() == null ? other.getUnitPrice() == null : this.getUnitPrice().equals(other.getUnitPrice()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getOperatorId() == null ? other.getOperatorId() == null : this.getOperatorId().equals(other.getOperatorId()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
            && (this.getUpdateDate() == null ? other.getUpdateDate() == null : this.getUpdateDate().equals(other.getUpdateDate()))
            && (this.getReviewDate() == null ? other.getReviewDate() == null : this.getReviewDate().equals(other.getReviewDate()))
            && (this.getReviewManagerId() == null ? other.getReviewManagerId() == null : this.getReviewManagerId().equals(other.getReviewManagerId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getInfoId() == null) ? 0 : getInfoId().hashCode());
        result = prime * result + ((getShopInfoId() == null) ? 0 : getShopInfoId().hashCode());
        result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
        result = prime * result + ((getQualifiedQuantity() == null) ? 0 : getQualifiedQuantity().hashCode());
        result = prime * result + ((getUnqualifiedQuantity() == null) ? 0 : getUnqualifiedQuantity().hashCode());
        result = prime * result + ((getUnitPrice() == null) ? 0 : getUnitPrice().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode());
        result = prime * result + ((getReviewDate() == null) ? 0 : getReviewDate().hashCode());
        result = prime * result + ((getReviewManagerId() == null) ? 0 : getReviewManagerId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", infoId=").append(infoId);
        sb.append(", shopInfoId=").append(shopInfoId);
        sb.append(", quantity=").append(quantity);
        sb.append(", qualifiedQuantity=").append(qualifiedQuantity);
        sb.append(", unqualifiedQuantity=").append(unqualifiedQuantity);
        sb.append(", unitPrice=").append(unitPrice);
        sb.append(", status=").append(status);
        sb.append(", operatorId=").append(operatorId);
        sb.append(", deleted=").append(deleted);
        sb.append(", createDate=").append(createDate);
        sb.append(", updateDate=").append(updateDate);
        sb.append(", reviewDate=").append(reviewDate);
        sb.append(", reviewManagerId=").append(reviewManagerId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}